package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface OrderDetailMapper {
    /**
     * 向订单明细表批量插入
     * @param orderDetailList
     */
    void insertBatch(List<OrderDetail> orderDetailList);

    /**
     * 通过订单id查询详细
     * @param id
     * @return
     */
    @Select("select *from order_detail where order_id=#{orderId}")
    List<OrderDetail> getById(Long id);


}
